<?php

namespace App\Controller\Util;

use App\Controller\AbstractController;
use App\Controller\Api\Base;
use App\Library\Address\AddressLibrary;
use App\WsService\ClientService;
use Hyperf\HttpServer\Annotation\Controller;
use Yj\Apidog\Annotation\FormData;
use Yj\Apidog\Annotation\PostApi;

/**
 * @Controller(prefix="util/address")
 */
class AddressController extends AbstractController
{
    /**
     * @PostApi(path="analytic", description="")
     * @FormData(key="lat")
     * @FormData(key="lng")
     */
    public function analytic(){
        $params = $this->getParams();
        $data = AddressLibrary::analytic($params->get('lat'),$params->get('lng'));
        _SUCCESS($data);
    }

}